<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>vue修饰符</title>

    <script src="vue.js"></script>
</head>
<body>
    <div id="app">
        <a href="www.baidu.com" @click.prevent="linkClick">百度一下</a>
    </div>

    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                test: '李哈哈'
            },
            methods: {
                linkClick(){
                    console.log("触发了prevent事件")
                }
            }
        })
    </script>
</body>
</html>